package com.lht.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单表实体
 *
 * @author ZhengZhanWu
 * @date 2020-02-06 13:42:45
 */
@Data
@NoArgsConstructor
@TableName("lst_order")
public class OrderEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId
    private Long id;
    /**
     * 创建时间
     */
    private Date createAt;
    /**
     * 更新时间
     */
    private Date updateAt;
    /**
     * 是否删除   0:未删除(默认)   1:删除
     */
    private String isDelete;
    /**
     * 申请编号
     */
    private String applyNo;
    /**
     * 推销员用户id
     */
    private Long promoUserId;
    /**
     * 产品id
     */
    private Long productId;
    /**
     * 贷款额度，单位元
     */
    private BigDecimal loanQuota;
    /**
     * 贷款年限，单位年
     */
    private Integer loanYears;
    /**
     * 贷款利率，单位%
     */
    private BigDecimal loanRate;
    /**
     * 订单状态  10:订单已提交   20:贷款申请中   30:贷款成功   40:贷款失败
     */
    private Integer orderStatus;
    /**
     * 最后跟进时间
     */
    private Date loanLastFollowAt;
    /**
     * 贷款提交时间
     */
    private Date loanSubmitAt;
    /**
     * 贷款申请时间
     */
    private Date loanApplyAt;
    /**
     * 贷款成功时间
     */
    private Date loanSuccessAt;
    /**
     * 贷款失败时间
     */
    private Date loanFailAt;

    /**
     * 关联对象
     */
    @TableField(exist = false)
    private String customerName;
    /**
     * 关联对象
     */
    @TableField(exist = false)
    private String customerMobile;
    /**
     * 关联对象
     */
    @TableField(exist = false)
    private String applyType;


    @TableField(exist = false)
    private String promoUserName;

    @TableField(exist = false)
    private String productName;

    @TableField(exist = false)
    private String bankName;

    /**
     * 订单合同信息
     */
    @TableField(exist = false)
    private OrderContractEntity orderContract;
    /**
     * 订单进度信息
     */
    @TableField(exist = false)
    private List<OrderFollowEntity> orderFollowList;

    public static final String ID = "id";
    public static final String CREATE_AT = "create_at";
    public static final String UPDATE_AT = "update_at";
    public static final String APPLY_NO = "apply_no";
    public static final String PROMO_USER_ID = "promo_user_id";
    public static final String PRODUCT_ID = "product_id";
    public static final String LOAN_QUOTA = "loan_quota";
    public static final String LOAN_YEARS = "loan_years";
    public static final String LOAN_RATE = "loan_rate";
    public static final String ORDER_STATUS = "order_status";
    public static final String LOAN_LAST_FOLLOW_AT = "loan_last_follow_at";
    public static final String LOAN_SUBMIT_AT = "loan_submit_at";
    public static final String LOAN_APPLY_AT = "loan_apply_at";
    public static final String LOAN_SUCCESS_AT = "loan_success_at";
    public static final String LOAN_FAIL_AT = "loan_fail_at";
}
